home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Hyper / U-Z / WindowsMenu 1.0.cpt / WindowsMenu 1.0 / WindowsMenu / cards.xml < prev    next >
Encoding:
Text File  |  1991-06-14  |  8.6 KB  |  121 lines

  1. card_3026.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>3026</id>
  6.     <filler1>0</filler1>
  7.     <cantDelete> <false /> </cantDelete>
  8.     <showPict> <true /> </showPict>
  9.     <dontSearch> <false /> </dontSearch>
  10.     <owner>2757</owner>
  11.     <link rel="stylesheet" type="text/css" href="stylesheet_3085.css" />
  12.     <part>
  13.         <id>1</id>
  14.         <type>button</type>
  15.         <visible> <true /> </visible>
  16.         <reserved5> 0 </reserved5>
  17.         <reserved4> 0 </reserved4>
  18.         <reserved3> 0 </reserved3>
  19.         <reserved2> 0 </reserved2>
  20.         <reserved1> 0 </reserved1>
  21.         <enabled> <true /> </enabled>
  22.         <rect>
  23.             <left>10</left>
  24.             <top>215</top>
  25.             <right>210</right>
  26.             <bottom>237</bottom>
  27.         </rect>
  28.         <style>roundrect</style>
  29.         <showName> <true /> </showName>
  30.         <highlight> <false /> </highlight>
  31.         <autoHighlight> <true /> </autoHighlight>
  32.         <sharedHighlight> <true /> </sharedHighlight>
  33.         <family>0</family>
  34.         <titleWidth>0</titleWidth>
  35.         <icon>0</icon>
  36.         <textAlign>center</textAlign>
  37.         <font>Chicago</font>
  38.         <textSize>12</textSize>
  39.         <textStyle>plain</textStyle>
  40.         <name>Click me to Install</name>
  41.         <script>on mouseUp
  42. -- this button will install the WindowsMenu into the Start Using
  43. -- message heirarchy
  44.  
  45. -- Use a copy of your home stack just to be safe.
  46.  
  47. -- can't run installer on locked media or locked stack
  48. If the cantModify of this stack is true then
  49. Answer "Sorry, but you can't use the WindowsMenu installer because"&&¬¨
  50. "either WindowsMenu is on a locked disk or it's CantModify property"&&¬¨
  51. "is set to TRUE.  Install off an unlocked version.  Once WindowsMenu"&&¬¨
  52. "has been installed, it can run while locked." with "Cancel"
  53. exit mouseUp
  54. end if
  55.  
  56. Answer "Install WindowsMenu into your Home stack?" with "Yes" or "No"
  57. if it is "Yes" then
  58. Answer "Have you backed up your Home stack just in case?" with "Yes" or "No"
  59. if it is "Yes" then
  60.  
  61. set the lockscreen to true
  62. set the lockmessages to true
  63. put the userlevel into mySavedUserLevel
  64. set the userlevel to 5
  65. set cursor to busy
  66.  
  67. -- go get the script of the home stack
  68. push card
  69. go home
  70. set cursor to busy
  71. put the script of this stack into myHomeScript
  72. set cursor to busy
  73. pop card
  74. set cursor to busy
  75.  
  76. -- put it into the temporary field
  77. put myHomeScript into card field "HomeScript"
  78. set cursor to busy
  79.  
  80. -- find the Startup handler and insert the Start Using Command
  81. -- just before the end.  It must be after the GetHomeInfo handler
  82. find whole "On Startup" in card field "HomeScript"
  83. set cursor to busy
  84. find whole "Pass Startup" in card field "HomeScript"
  85. set cursor to busy
  86. if the foundLine is empty then
  87. Answer "Unable to Install -- your Home stack has been modified!"
  88. set userlevel to mySavedUserLevel
  89. exit MouseUp
  90. end if
  91. put return&"-- WindowsMenu ¬© 1991 by Paul M. Lemieux"&return&¬¨
  92. "Start Using Stack"&&quote&"WindowsMenu"&quote&return¬¨
  93. before the foundLine
  94. set cursor to busy
  95.  
  96. -- go put our modified script back into the home stack
  97. put card field "HomeScript" into myHomeScript
  98. set cursor to busy
  99. put empty into card field "HomeScript"
  100. push card
  101. go home
  102. set cursor to busy
  103. set the script of this stack to myHomeScript
  104. set cursor to busy
  105.  
  106. -- finished!
  107. pop card
  108. set cursor to busy
  109. stop using this stack
  110. doMenu "Compact Stack"
  111. set the userlevel to mySavedUserLevel
  112. start using this stack
  113. send openstack to this stack
  114. set the lockmessages to false
  115. set the lockscreen to false
  116. end if
  117. end if
  118. end mouseUp</script>
  119.     </part>
  120.     <part>
  121.         <id>2</id>
  122.         <type>field</type>
  123.         <visible> <false /> </visible>
  124.         <dontWrap> <false /> </dontWrap>
  125.         <dontSearch> <false /> </dontSearch>
  126.         <sharedText> <false /> </sharedText>
  127.         <fixedLineHeight> <false /> </fixedLineHeight>
  128.         <autoTab> <false /> </autoTab>
  129.         <lockText> <true /> </lockText>
  130.         <rect>
  131.             <left>9</left>
  132.             <top>79</top>
  133.             <right>408</right>
  134.             <bottom>211</bottom>
  135.         </rect>
  136.         <style>scrolling</style>
  137.         <autoSelect> <false /> </autoSelect>
  138.         <showLines> <false /> </showLines>
  139.         <wideMargins> <false /> </wideMargins>
  140.         <multipleLines> <false /> </multipleLines>
  141.         <reservedFamily> 0 </reservedFamily>
  142.         <titleWidth>0</titleWidth>
  143.         <icon>0</icon>
  144.         <textAlign>left</textAlign>
  145.         <font>Monaco</font>
  146.         <textSize>9</textSize>
  147.         <textStyle>plain</textStyle>
  148.         <textHeight>12</textHeight>
  149.         <name>HomeScript</name>
  150.         <script></script>
  151.     </part>
  152.     <part>
  153.         <id>3</id>
  154.         <type>button</type>
  155.         <visible> <true /> </visible>
  156.         <reserved5> 0 </reserved5>
  157.         <reserved4> 0 </reserved4>
  158.         <reserved3> 0 </reserved3>
  159.         <reserved2> 0 </reserved2>
  160.         <reserved1> 0 </reserved1>
  161.         <enabled> <true /> </enabled>
  162.         <rect>
  163.             <left>214</left>
  164.             <top>215</top>
  165.             <right>407</right>
  166.             <bottom>237</bottom>
  167.         </rect>
  168.         <style>roundrect</style>
  169.         <showName> <true /> </showName>
  170.         <highlight> <false /> </highlight>
  171.         <autoHighlight> <true /> </autoHighlight>
  172.         <sharedHighlight> <true /> </sharedHighlight>
  173.         <family>0</family>
  174.         <titleWidth>0</titleWidth>
  175.         <icon>0</icon>
  176.         <textAlign>center</textAlign>
  177.         <font>Chicago</font>
  178.         <textSize>12</textSize>
  179.         <textStyle>plain</textStyle>
  180.         <name>Try It Out!</name>
  181.         <script>on mouseUp
  182. Answer "Temporarily install WindowsMenu?  It will remain"&&¬¨
  183. "in operation until you quit HyperCard‚Ķ" with "Yes" or "No"
  184. if it is "Yes" then
  185. start using this stack
  186. send openstack to this stack
  187. end if
  188. end mouseUp</script>
  189.     </part>
  190.     <content>
  191.         <layer>background</layer>
  192.         <id>1</id>
  193.         <text>WindowsMenu 1.0
  194. ¬© 1991 by
  195. Paul M. Lemieux</text>
  196.     </content>
  197.     <content>
  198.         <layer>background</layer>
  199.         <id>4</id>
  200.         <text><span class="style2">indowsMenu</span><span class="style1"> will add a </span><span class="style3">Windows</span><span class="style1"> menu to your HyperCard MenuBar.  It came about because I wanted to be able to start a time consuming script and be able to switch out of HyperCard while running System 7.  On a toaster Mac, the only way to do this is to click on the desktop once the script has started.
  201.  
  202. The </span><span class="style3">Windows</span><span class="style1"> menu will enable you to shrink your windows to a predetermined size, and it will allow you to switch between all open stacks.  You can use the zoom box on the window to return it to its previous size.  If you don't like the size I have it shrink to, open the stack script and change the values of the rectangle defined in the </span><span class="style4">ShrinkIt</span><span class="style1"> handler.
  203.  
  204. </span><span class="style2">WindowsMenu</span><span class="style1"> is a stack specifically meant to be placed inside the "Start Using" list of stacks who's scripts are accessible to all stacks within the message heirarchy.  Clicking the "Click me to Install" button will add a line to your Home stack's stack script to include </span><span class="style2">WindowsMenu</span><span class="style1">.  If your Home stack's stack script has been modified, it may be possible that the installation will fail.  If this is the case, then simply add the line </span><span class="style4">Start Using "WindowsMenu"</span><span class="style1"> inside the Startup handler of your Home stack script.  The line must be inserted after the </span><span class="style4">GetHomeInfo</span><span class="style1"> has been called.
  205.  
  206. </span><span class="style2">WindowsMenu</span><span class="style1"> depends on stacks passing </span><span class="style4">OpenStack</span><span class="style1">, </span><span class="style4">CloseStack</span><span class="style1">, </span><span class="style4">ResumeStack</span><span class="style1">, and </span><span class="style4">SuspendStack</span><span class="style1"> messages on up the message heirarchy.  I trapped </span><span class="style4">CloseStack</span><span class="style1"> and </span><span class="style4">SuspendStack</span><span class="style1"> to remove the </span><span class="style2">WindowsMenu</span><span class="style1">.  That way the </span><span class="style2">WindowsMenu</span><span class="style1"> will attempt be the rightmost menu, which seems to be the conventional Mac user interface standard.  Of course, I have no control over other people's scripting so this might not always be the case.
  207.  
  208. </span><span class="style2">WindowsMenu</span><span class="style1"> is postcardware, but I retain the copyrights to the software.  There is no charge, but if you like the software, please send me a postcard and let me know.  In the spirit of fair play in HyperTalk scripting, this stack is not protected in any way.
  209.  
  210. Paul Lemieux
  211. 905 Union Street
  212. Cary, NC 27511
  213. GEnie: P.Lemieux2
  214. AOL: PaulLX
  215.  
  216. AppleSeeds BBS
  217. The Raleigh Macintosh Users Group
  218. 919-481-4896
  219. Over 700 Mb of Online Files
  220. (I am the Sysop)</span></text>
  221.     </content>
  222.     <name></name>
  223.     <script>on openCard
  224. set the scroll of bkgnd field "help" to 0
  225. end openCard</script>
  226. </card>
  227.  
  228.  
  229.